package com.heima.search.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.search.dto.ApArticleSearchDto;
import com.heima.search.service.IAssociateWordsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/associate")
@Api(tags = "联想词表接口")
@CrossOrigin
public class ApAssociateWordsController {

    @Autowired
    private IAssociateWordsService apAssociateWordsService;

    @PostMapping("/search")
    public ResponseResult search(@RequestBody ApArticleSearchDto dto) {
        return apAssociateWordsService.search(dto);
    }
}
